<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<form id="pagerForm" action="group/selectGroup${httpSuf}">
    <input type="hidden" name="pageNum" value="1"/>
    <input type="hidden" name="numPerPage" value="${model.numPerPage}"/>
    <input type="hidden" name="orderField" value="${param.orderField}"/>
    <input type="hidden" name="orderDirection" value="${param.orderDirection}"/>
</form>

<div class="pageHeader">
    <form rel="pagerForm" method="post" action="group/selectGroup${httpSuf}" onsubmit="return dwzSearch(this, 'dialog');">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        名称：<input type="text" name="name" value="${param.name}"/>
                    </td>
                    <td>
                        状态：
                        <select name="status">
                            <option value="">全部</option>
                            <option value="1" <c:if test="${param.status == '1'}">selected="selected"</c:if>>正常</option>
                            <option value="0" <c:if test="${param.status == '0'}">selected="selected"</c:if>>锁定</option>
                        </select>
                    </td>
                    <td>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">检索</button>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</div>
<div class="pageContent">

    <table class="table" layoutH="118" targetType="dialog" width="100%">
        <thead>
        <tr>
            <th width="120">编号</th>
            <th width="120">名称</th>
            <th width="120">状态</th>
            <th width="80">查找带回</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${groups}" var="list">
            <tr>
                <td>${list.id}</td>
                <td>${list.name}</td>
                <td>
                    <c:if test="${list.status == 1}">正常</c:if>
                    <c:if test="${list.status == 0}">锁定</c:if>
                </td>
                <td>
                    <a class="btnSelect"
                       href="javascript:$.bringBack({groupid:'${list.id }', groupname:'${list.name}'})">选择</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>

    <div class="panelBar">
        <div class="pages">
            <span>共&nbsp;${totalCount}&nbsp;条</span>
        </div>
        <div class="pagination" targetType="dialog" totalCount="2" numPerPage="10" pageNumShown="1"
             currentPage="1"></div>
    </div>
</div>
